
* Set Working Directory and Create Folder in it for "Stata Plots"
cd ""


***************************  ANES TIME SERIES  ***************************************

use ANES_TimeSeries.dta, clear
svyset [pweight=weightfull]


***** FIGURE 1 - ILLEGAL ALIENS/IMMIGRANTS FT *****

* Panel A - National
estimates clear

svy: mean illegalimm, over (year)
estimates store A
svy: mean illegalimm if democrat==1, over (year)
estimates store B
svy: mean illegalimm if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illegalimm@1988.year=1988 c.illegalimm@1992.year=1992 c.illegalimm@1994.year=1994 c.illegalimm@1996.year=1996  c.illegalimm@1998.year=1998 c.illegalimm@2004.year=2004 c.illegalimm@2008.year=2008 c.illegalimm@2012.year=2012 c.illegalimm@2016.year=2016 c.illegalimm@2020.year=2020) vertical coeflabels() xlabel(1988 "1988" 1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0" .25 "25" .5 "50" .75 "75" 1 "100", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Mean Rating}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure1_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean illegalimm if white==1, over (year)
estimates store A
svy: mean illegalimm if democrat==1 & white==1, over (year)
estimates store B
svy: mean illegalimm if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illegalimm@1988.year=1988 c.illegalimm@1992.year=1992 c.illegalimm@1994.year=1994 c.illegalimm@1996.year=1996  c.illegalimm@1998.year=1998 c.illegalimm@2004.year=2004 c.illegalimm@2008.year=2008 c.illegalimm@2012.year=2012 c.illegalimm@2016.year=2016 c.illegalimm@2020.year=2020) vertical coeflabels() xlabel(1988 "1988" 1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0" .25 "25" .5 "50" .75 "75" 1 "100", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Mean Rating}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure1_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean illegalimm if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.illegalimm@1988.year=1988 c.illegalimm@1992.year=1992 c.illegalimm@1994.year=1994 c.illegalimm@1996.year=1996  c.illegalimm@1998.year=1998 c.illegalimm@2004.year=2004 c.illegalimm@2008.year=2008 c.illegalimm@2012.year=2012 c.illegalimm@2016.year=2016 c.illegalimm@2020.year=2020) vertical coeflabels() xlabel(1988 "1988" 1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0" .25 "25" .5 "50" .75 "75" 1 "100", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Mean Rating}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure1_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean illegalimm if hispanic==1, over (year)
estimates store A
svy: mean illegalimm if democrat==1 & hispanic==1, over (year)
estimates store B
svy: mean illegalimm if republican==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illegalimm@1988.year=1988 c.illegalimm@1992.year=1992 c.illegalimm@1994.year=1994 c.illegalimm@1996.year=1996  c.illegalimm@1998.year=1998 c.illegalimm@2004.year=2004 c.illegalimm@2008.year=2008 c.illegalimm@2012.year=2012 c.illegalimm@2016.year=2016 c.illegalimm@2020.year=2020) vertical coeflabels() xlabel(1988 "1988" 1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0" .25 "25" .5 "50" .75 "75" 1 "100", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Mean Rating}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure1_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure1_A.gph" "Stata Plots\Figure1_B.gph" "Stata Plots\Figure1_C.gph" "Stata Plots\Figure1_D.gph", rows(2) altshrink


***** FIGURE 2 - EFFECTS OF IMMIGRATION ON AMERICAN JOBS ***** 

* Panel A - National
estimates clear

svy: mean immtakejobs, over (year)
estimates store A
svy: mean immtakejobs if democrat==1, over (year)
estimates store B
svy: mean immtakejobs if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immtakejobs@2004.year=2004 c.immtakejobs@2008.year=2008 c.immtakejobs@2012.year=2012 c.immtakejobs@2016.year=2016 c.immtakejobs@2020.year=2020) vertical coeflabels() xlabel(2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure2_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean immtakejobs if white==1, over (year)
estimates store A
svy: mean immtakejobs if democrat==1 & white==1, over (year)
estimates store B
svy: mean immtakejobs if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immtakejobs@2004.year=2004 c.immtakejobs@2008.year=2008 c.immtakejobs@2012.year=2012 c.immtakejobs@2016.year=2016 c.immtakejobs@2020.year=2020) vertical coeflabels() xlabel(2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure2_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean immtakejobs if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.immtakejobs@2004.year=2004 c.immtakejobs@2008.year=2008 c.immtakejobs@2012.year=2012 c.immtakejobs@2016.year=2016 c.immtakejobs@2020.year=2020) vertical coeflabels() xlabel(2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure2_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean immtakejobs if hispanic==1, over (year)
estimates store A
svy: mean immtakejobs if democrat==1 & hispanic==1, over (year)
estimates store B
svy: mean immtakejobs if republican==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immtakejobs@2004.year=2004 c.immtakejobs@2008.year=2008 c.immtakejobs@2012.year=2012 c.immtakejobs@2016.year=2016 c.immtakejobs@2020.year=2020) vertical coeflabels() xlabel(2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure2_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure2_A.gph" "Stata Plots\Figure2_B.gph" "Stata Plots\Figure2_C.gph" "Stata Plots\Figure2_D.gph", rows(2) altshrink


***** FIGURE 4 - INCREASE IMMIGRATION LEVELS ***** 

* Panel A - National
estimates clear

svy: mean increase_immigration, over (year)
estimates store A
svy: mean increase_immigration if democrat==1, over (year)
estimates store B
svy: mean increase_immigration if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.increase_immigration@1992.year=1992 c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@1998.year=1998 c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2008.year=2008 c.increase_immigration@2012.year=2012 c.increase_immigration@2016.year=2016 c.increase_immigration@2020.year=2020) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure4_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean increase_immigration if white==1, over (year)
estimates store A
svy: mean increase_immigration if democrat==1 & white==1, over (year)
estimates store B
svy: mean increase_immigration if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.increase_immigration@1992.year=1992 c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@1998.year=1998 c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2008.year=2008 c.increase_immigration@2012.year=2012 c.increase_immigration@2016.year=2016 c.increase_immigration@2020.year=2020) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure4_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean increase_immigration if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.increase_immigration@1992.year=1992 c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@1998.year=1998 c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2008.year=2008 c.increase_immigration@2012.year=2012 c.increase_immigration@2016.year=2016 c.increase_immigration@2020.year=2020) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure4_C.gph", replace)


* Panel D - Hispanics
estimates clear

svy: mean increase_immigration if hispanic==1, over (year)
estimates store A
svy: mean increase_immigration if democrat==1 & hispanic==1, over (year)
estimates store B
svy: mean increase_immigration if republican==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.increase_immigration@1992.year=1992 c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@1998.year=1998 c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2008.year=2008 c.increase_immigration@2012.year=2012 c.increase_immigration@2016.year=2016 c.increase_immigration@2020.year=2020) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure4_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure4_A.gph" "Stata Plots\Figure4_B.gph" "Stata Plots\Figure4_C.gph" "Stata Plots\Figure4_D.gph", rows(2) altshrink


***** SUPPLEMENTARY MATERIAL 4 - MODE EFFECTS ***** 
svy: mean increase_immigration if year == 2012, over(VCF0017)
svy: mean increase_immigration if year == 2016, over(VCF0017)

svy: mean immtakejobs if year == 2012, over(VCF0017)
svy: mean immtakejobs if year == 2016, over(VCF0017)

svy: mean illegalimm if year == 2012, over(VCF0017)
svy: mean illegalimm if year == 2016, over(VCF0017)


***** FIGURE 8 - FEDERAL SPENDING ON BORDER SECURITY *****

use ANES_BorderCompiled.dta, clear
svyset[pweight=weight]

* Panel A - National
estimates clear

svy: mean border_increase, over (year)
estimates store A
svy: mean border_increase if democrat==1, over (year)
estimates store B
svy: mean border_increase if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.border_increase@2000.year=2000 c.border_increase@2004.year=2004 c.border_increase@2008.year=2008 c.border_increase@2020.year=2020) vertical coeflabels() xlabel(2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure8_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean border_increase if white==1, over (year)
estimates store A
svy: mean border_increase if democrat==1 & white==1, over (year)
estimates store B
svy: mean border_increase if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.border_increase@2000.year=2000 c.border_increase@2004.year=2004 c.border_increase@2008.year=2008 c.border_increase@2020.year=2020) vertical coeflabels() xlabel(2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure8_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean border_increase if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.border_increase@2000.year=2000 c.border_increase@2004.year=2004 c.border_increase@2008.year=2008 c.border_increase@2020.year=2020) vertical coeflabels() xlabel(2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure8_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean border_increase if hispanic==1, over (year)
estimates store A
svy: mean border_increase if democrat==1 & hispanic==1, over (year)
estimates store B
svy: mean border_increase if republican==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.border_increase@2000.year=2000 c.border_increase@2004.year=2004 c.border_increase@2008.year=2008 c.border_increase@2020.year=2020) vertical coeflabels() xlabel(2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure8_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure8_A.gph" "Stata Plots\Figure8_B.gph" "Stata Plots\Figure8_C.gph" "Stata Plots\Figure8_D.gph", rows(2) altshrink


******************************  GSS  ********************************

use GSS_Coded.dta, clear
svyset[pweight=weight]

***** SUPPLEMENTARY MATERIAL 2 - INCREASE IMMIGRATION (Note: GSS collected one sample late-2020/early-2021) *****

* Panel A - National
estimates clear

svy: mean increase_immigration, over (year)
estimates store A
svy: mean increase_immigration if democrat==1, over (year)
estimates store B
svy: mean increase_immigration if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2006.year=2006 c.increase_immigration@2008.year=2008 c.increase_immigration@2010.year=2010 c.increase_immigration@2012.year=2012 c.increase_immigration@2014.year=2014 c.increase_immigration@2016.year=2016 c.increase_immigration@2018.year=2018 c.increase_immigration@2021.year=2021) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\FigureSM2_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean increase_immigration if white==1, over (year)
estimates store A
svy: mean increase_immigration if democrat==1 & white==1, over (year)
estimates store B
svy: mean increase_immigration if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2006.year=2006 c.increase_immigration@2008.year=2008 c.increase_immigration@2010.year=2010 c.increase_immigration@2012.year=2012 c.increase_immigration@2014.year=2014 c.increase_immigration@2016.year=2016 c.increase_immigration@2018.year=2018 c.increase_immigration@2021.year=2021) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\FigureSM2_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean increase_immigration if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2006.year=2006 c.increase_immigration@2008.year=2008 c.increase_immigration@2010.year=2010 c.increase_immigration@2012.year=2012 c.increase_immigration@2014.year=2014 c.increase_immigration@2016.year=2016 c.increase_immigration@2018.year=2018 c.increase_immigration@2021.year=2021) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\FigureSM2_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean increase_immigration if hispanic==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.increase_immigration@1994.year=1994 c.increase_immigration@1996.year=1996  c.increase_immigration@2000.year=2000 c.increase_immigration@2004.year=2004 c.increase_immigration@2006.year=2006 c.increase_immigration@2008.year=2008 c.increase_immigration@2010.year=2010 c.increase_immigration@2012.year=2012 c.increase_immigration@2014.year=2014 c.increase_immigration@2016.year=2016 c.increase_immigration@2018.year=2018 c.increase_immigration@2021.year=2021) vertical coeflabels() xlabel(1992 "1992" 1996 "1996" 2000 "2000" 2004 "2004" 2008 "2008" 2012 "2012" 2016 "2016" 2020 "2020", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\FigureSM2_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black and Hispanic Panels
graph combine "Stata Plots\FigureSM2_A.gph" "Stata Plots\FigureSM2_B.gph" "Stata Plots\FigureSM2_C.gph" "Stata Plots\FigureSM2_D.gph", rows(2) altshrink


**************************************  CCES  *****************************************************

use CES_MERGED.dta, clear
svyset[pweight=weight]

***** FIGURE 9 - INCREASE BORDER PATROLS *****

* Panel A - National
estimates clear

svy: mean illimm_borderpatrol, over(year)
estimates store A
svy: mean illimm_borderpatrol if democrat==1 , over (year)
estimates store B
svy: mean illimm_borderpatrol if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illimm_borderpatrol@2007.year=2007 c.illimm_borderpatrol@2010.year=2010 c.illimm_borderpatrol@2011.year=2011 c.illimm_borderpatrol@2012.year=2012 c.illimm_borderpatrol@2013.year=2013 c.illimm_borderpatrol@2014.year=2014 c.illimm_borderpatrol@2015.year=2015 c.illimm_borderpatrol@2016.year=2016 c.illimm_borderpatrol@2017.year=2017 c.illimm_borderpatrol@2018.year=2018 c.illimm_borderpatrol@2019.year=2019 c.illimm_borderpatrol@2020.year=2020 c.illimm_borderpatrol@2021.year=2021 c.illimm_borderpatrol@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure9_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean illimm_borderpatrol if white==1, over (year)
estimates store A
svy: mean illimm_borderpatrol if democrat==1 & white==1, over (year)
estimates store B
svy: mean illimm_borderpatrol if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illimm_borderpatrol@2007.year=2007 c.illimm_borderpatrol@2010.year=2010 c.illimm_borderpatrol@2011.year=2011 c.illimm_borderpatrol@2012.year=2012 c.illimm_borderpatrol@2013.year=2013 c.illimm_borderpatrol@2014.year=2014 c.illimm_borderpatrol@2015.year=2015 c.illimm_borderpatrol@2016.year=2016 c.illimm_borderpatrol@2017.year=2017 c.illimm_borderpatrol@2018.year=2018 c.illimm_borderpatrol@2019.year=2019 c.illimm_borderpatrol@2020.year=2020 c.illimm_borderpatrol@2021.year=2021 c.illimm_borderpatrol@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure9_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean illimm_borderpatrol if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.illimm_borderpatrol@2007.year=2007 c.illimm_borderpatrol@2010.year=2010 c.illimm_borderpatrol@2011.year=2011 c.illimm_borderpatrol@2012.year=2012 c.illimm_borderpatrol@2013.year=2013 c.illimm_borderpatrol@2014.year=2014 c.illimm_borderpatrol@2015.year=2015 c.illimm_borderpatrol@2016.year=2016 c.illimm_borderpatrol@2017.year=2017 c.illimm_borderpatrol@2018.year=2018 c.illimm_borderpatrol@2019.year=2019 c.illimm_borderpatrol@2020.year=2020 c.illimm_borderpatrol@2021.year=2021 c.illimm_borderpatrol@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure9_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean illimm_borderpatrol if hispanic==1, over (year)
estimates store A
svy: mean illimm_borderpatrol if democrat==1 & hispanic==1, over (year)
estimates store B
svy: mean illimm_borderpatrol if republican==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illimm_borderpatrol@2007.year=2007 c.illimm_borderpatrol@2010.year=2010 c.illimm_borderpatrol@2011.year=2011 c.illimm_borderpatrol@2012.year=2012 c.illimm_borderpatrol@2013.year=2013 c.illimm_borderpatrol@2014.year=2014 c.illimm_borderpatrol@2015.year=2015 c.illimm_borderpatrol@2016.year=2016 c.illimm_borderpatrol@2017.year=2017 c.illimm_borderpatrol@2018.year=2018 c.illimm_borderpatrol@2019.year=2019 c.illimm_borderpatrol@2020.year=2020 c.illimm_borderpatrol@2021.year=2021 c.illimm_borderpatrol@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure9_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure9_A.gph" "Stata Plots\Figure9_B.gph" "Stata Plots\Figure9_C.gph" "Stata Plots\Figure9_D.gph", rows(2) altshrink


***** FIGURE 6 - AMNESTY PROGRAMS *****

* Panel A - National
estimates clear

svy: mean illimm_amnesty, over (year)
estimates store A
svy: mean illimm_amnesty if democrat==1, over (year)
estimates store B
svy: mean illimm_amnesty if republican==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illimm_amnesty@2007.year=2007 c.illimm_amnesty@2010.year=2010 c.illimm_amnesty@2011.year=2011 c.illimm_amnesty@2012.year=2012 c.illimm_amnesty@2013.year=2013 c.illimm_amnesty@2014.year=2014 c.illimm_amnesty@2015.year=2015 c.illimm_amnesty@2016.year=2016 c.illimm_amnesty@2017.year=2017 c.illimm_amnesty@2018.year=2018 c.illimm_amnesty@2019.year=2019 c.illimm_amnesty@2020.year=2020 c.illimm_amnesty@2021.year=2021 c.illimm_amnesty@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure6_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean illimm_amnesty if white==1, over (year)
estimates store A
svy: mean illimm_amnesty if democrat==1 & white==1, over (year)
estimates store B
svy: mean illimm_amnesty if republican==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illimm_amnesty@2007.year=2007 c.illimm_amnesty@2010.year=2010 c.illimm_amnesty@2011.year=2011 c.illimm_amnesty@2012.year=2012 c.illimm_amnesty@2013.year=2013 c.illimm_amnesty@2014.year=2014 c.illimm_amnesty@2015.year=2015 c.illimm_amnesty@2016.year=2016 c.illimm_amnesty@2017.year=2017 c.illimm_amnesty@2018.year=2018 c.illimm_amnesty@2019.year=2019 c.illimm_amnesty@2020.year=2020 c.illimm_amnesty@2021.year=2021 c.illimm_amnesty@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure6_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean illimm_amnesty if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.illimm_amnesty@2007.year=2007 c.illimm_amnesty@2010.year=2010 c.illimm_amnesty@2011.year=2011 c.illimm_amnesty@2012.year=2012 c.illimm_amnesty@2013.year=2013 c.illimm_amnesty@2014.year=2014 c.illimm_amnesty@2015.year=2015 c.illimm_amnesty@2016.year=2016 c.illimm_amnesty@2017.year=2017 c.illimm_amnesty@2018.year=2018 c.illimm_amnesty@2019.year=2019 c.illimm_amnesty@2020.year=2020 c.illimm_amnesty@2021.year=2021 c.illimm_amnesty@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure6_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean illimm_amnesty if hispanic==1, over (year)
estimates store A
svy: mean illimm_amnesty if democrat==1 & hispanic==1, over (year)
estimates store B
svy: mean illimm_amnesty if republican==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.illimm_amnesty@2007.year=2007 c.illimm_amnesty@2010.year=2010 c.illimm_amnesty@2011.year=2011 c.illimm_amnesty@2012.year=2012 c.illimm_amnesty@2013.year=2013 c.illimm_amnesty@2014.year=2014 c.illimm_amnesty@2015.year=2015 c.illimm_amnesty@2016.year=2016 c.illimm_amnesty@2017.year=2017 c.illimm_amnesty@2018.year=2018 c.illimm_amnesty@2019.year=2019 c.illimm_amnesty@2020.year=2020 c.illimm_amnesty@2021.year=2021 c.illimm_amnesty@2022.year=2022) vertical coeflabels() xlabel(2008 "2008" 2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure6_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure6_A.gph" "Stata Plots\Figure6_B.gph" "Stata Plots\Figure6_C.gph" "Stata Plots\Figure6_D.gph", rows(2) altshrink


***** Footnote on Border Wall in 2007 *****
svy: mean borderwall if democrat == 1 & year == 2007
svy: mean borderwall if republican == 1 & year == 2007


*****************************************  PRRI  ****************************************************

use PRRI_CODED.dta, clear
svyset [pweight=weight]

***** FIGURE 3 - Immigrants Strengthen vs. Threaten US ******

* Panel A - National
estimates clear

svy: mean immigration_strength2, over (year)
estimates store A
svy: mean immigration_strength2 if strongdem==1, over (year)
estimates store B
svy: mean immigration_strength2 if strongrep==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immigration_strength2@2010.year=2010 c.immigration_strength2@2011.year=2011 c.immigration_strength2@2013.year=2013  c.immigration_strength2@2014.year=2014 c.immigration_strength2@2015.year=2015 c.immigration_strength2@2016.year=2016 c.immigration_strength2@2018.year=2018 c.immigration_strength2@2019.year=2019 c.immigration_strength2@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  National}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure3_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean immigration_strength2 if white==1, over (year)
estimates store A
svy: mean immigration_strength2 if strongdem==1 & white==1, over (year)
estimates store B
svy: mean immigration_strength2 if strongrep==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immigration_strength2@2010.year=2010 c.immigration_strength2@2011.year=2011 c.immigration_strength2@2013.year=2013  c.immigration_strength2@2014.year=2014 c.immigration_strength2@2015.year=2015 c.immigration_strength2@2016.year=2016 c.immigration_strength2@2018.year=2018 c.immigration_strength2@2019.year=2019 c.immigration_strength2@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  Whites}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure3_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean immigration_strength2 if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.immigration_strength2@2010.year=2010 c.immigration_strength2@2011.year=2011 c.immigration_strength2@2013.year=2013  c.immigration_strength2@2014.year=2014 c.immigration_strength2@2015.year=2015 c.immigration_strength2@2016.year=2016 c.immigration_strength2@2018.year=2018 c.immigration_strength2@2019.year=2019 c.immigration_strength2@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  Blacks}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure3_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean immigration_strength2 if hispanic==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.immigration_strength2@2010.year=2010 c.immigration_strength2@2011.year=2011 c.immigration_strength2@2013.year=2013  c.immigration_strength2@2014.year=2014 c.immigration_strength2@2015.year=2015 c.immigration_strength2@2016.year=2016 c.immigration_strength2@2018.year=2018 c.immigration_strength2@2019.year=2019 c.immigration_strength2@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Agreement}, size(vlarge)) title({bf:  Hispanics}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure3_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black and Hispanic Panels
graph combine "Stata Plots\Figure3_A.gph" "Stata Plots\Figure3_B.gph" "Stata Plots\Figure3_C.gph" "Stata Plots\Figure3_D.gph", rows(2) altshrink



***** FIGURE 7 - DREAMers Path to Citizenship *****

* Panel A - National
estimates clear

svy: mean immigrant_kids, over (year)
estimates store A
svy: mean immigrant_kids if strongdem==1, over (year)
estimates store B
svy: mean immigrant_kids if strongrep==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immigrant_kids@2011.year=2011 c.immigrant_kids@2012.year=2012 c.immigrant_kids@2013.year=2013  c.immigrant_kids@2014.year=2014 c.immigrant_kids@2015.year=2015 c.immigrant_kids@2017.year=2017 c.immigrant_kids@2018.year=2018 c.immigrant_kids@2019.year=2019 c.immigrant_kids@2020.year=2020 c.immigrant_kids@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  National}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure7_A.gph", replace)


* Panel B - Whites
estimates clear

svy: mean immigrant_kids if white==1, over (year)
estimates store A
svy: mean immigrant_kids if strongdem==1 & white==1, over (year)
estimates store B
svy: mean immigrant_kids if strongrep==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immigrant_kids@2011.year=2011 c.immigrant_kids@2012.year=2012 c.immigrant_kids@2013.year=2013  c.immigrant_kids@2014.year=2014 c.immigrant_kids@2015.year=2015 c.immigrant_kids@2017.year=2017 c.immigrant_kids@2018.year=2018 c.immigrant_kids@2019.year=2019 c.immigrant_kids@2020.year=2020 c.immigrant_kids@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Whites}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure7_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean immigrant_kids if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.immigrant_kids@2011.year=2011 c.immigrant_kids@2012.year=2012 c.immigrant_kids@2013.year=2013  c.immigrant_kids@2014.year=2014 c.immigrant_kids@2015.year=2015 c.immigrant_kids@2017.year=2017 c.immigrant_kids@2018.year=2018 c.immigrant_kids@2019.year=2019 c.immigrant_kids@2020.year=2020 c.immigrant_kids@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Blacks}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure7_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean immigrant_kids if hispanic==1, over (year)
estimates store A
svy: mean immigrant_kids if strongdem==1 & hispanic==1, over (year)
estimates store B
svy: mean immigrant_kids if strongrep==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.immigrant_kids@2011.year=2011 c.immigrant_kids@2012.year=2012 c.immigrant_kids@2013.year=2013  c.immigrant_kids@2014.year=2014 c.immigrant_kids@2015.year=2015 c.immigrant_kids@2017.year=2017 c.immigrant_kids@2018.year=2018 c.immigrant_kids@2019.year=2019 c.immigrant_kids@2020.year=2020 c.immigrant_kids@2021.year=2021) vertical coeflabels() xlabel(2010 "2010" 2012 "2012" 2014 "2014" 2016 "2016" 2018 "2018" 2020 "2020" 2022 "2022", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Support}, size(vlarge)) title({bf:  Hispanics}, size(8)) xscale(range(2010 2022.25)) saving("Stata Plots\Figure7_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure7_A.gph" "Stata Plots\Figure7_B.gph" "Stata Plots\Figure7_C.gph" "Stata Plots\Figure7_D.gph", rows(2) altshrink


***** FIGURE 5 - REFUGEE ADMISSIONS BAN *****

* Panel A - National
estimates clear

svy: mean refugeeban, over (year)
estimates store A
svy: mean refugeeban if strongdem==1, over (year)
estimates store B
svy: mean refugeeban if strongrep==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.refugeeban@2016.year=2016 c.refugeeban@2017.year=2017 c.refugeeban@2018.year=2018 c.refugeeban@2019.year=2019 c.refugeeban@2020.year=2020 c.refugeeban@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure5_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean refugeeban if white==1, over (year)
estimates store A
svy: mean refugeeban if strongdem==1 & white==1, over (year)
estimates store B
svy: mean refugeeban if strongrep==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.refugeeban@2016.year=2016 c.refugeeban@2017.year=2017 c.refugeeban@2018.year=2018 c.refugeeban@2019.year=2019 c.refugeeban@2020.year=2020 c.refugeeban@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure5_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean refugeeban if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.refugeeban@2016.year=2016 c.refugeeban@2017.year=2017 c.refugeeban@2018.year=2018 c.refugeeban@2019.year=2019 c.refugeeban@2020.year=2020 c.refugeeban@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure5_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean refugeeban if hispanic==1, over (year)
estimates store A
svy: mean refugeeban if strongdem==1 & hispanic==1, over (year)
estimates store B
svy: mean refugeeban if strongrep==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.refugeeban@2016.year=2016 c.refugeeban@2017.year=2017 c.refugeeban@2018.year=2018 c.refugeeban@2019.year=2019 c.refugeeban@2020.year=2020 c.refugeeban@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure5_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure5_A.gph" "Stata Plots\Figure5_B.gph" "Stata Plots\Figure5_C.gph" "Stata Plots\Figure5_D.gph", rows(2) altshrink


***** FIGURE 10 - BORDER WALL *****

* Panel A - National
estimates clear

svy: mean borderwall, over (year)
estimates store A
svy: mean borderwall if strongdem==1, over (year)
estimates store B
svy: mean borderwall if strongrep==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.borderwall@2016.year=2016 c.borderwall@2017.year=2017 c.borderwall@2018.year=2018 c.borderwall@2019.year=2019 c.borderwall@2020.year=2020 c.borderwall@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  National}, size(8)) saving("Stata Plots\Figure10_A.gph", replace)

* Panel B - Whites
estimates clear

svy: mean borderwall if white==1, over (year)
estimates store A
svy: mean borderwall if strongdem==1 & white==1, over (year)
estimates store B
svy: mean borderwall if strongrep==1 & white==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.borderwall@2016.year=2016 c.borderwall@2017.year=2017 c.borderwall@2018.year=2018 c.borderwall@2019.year=2019 c.borderwall@2020.year=2020 c.borderwall@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Whites}, size(8)) saving("Stata Plots\Figure10_B.gph", replace)

* Panel C - Blacks
estimates clear

svy: mean borderwall if black==1, over (year)
estimates store A

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
, relocate(c.borderwall@2016.year=2016 c.borderwall@2017.year=2017 c.borderwall@2018.year=2018 c.borderwall@2019.year=2019 c.borderwall@2020.year=2020 c.borderwall@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Blacks}, size(8)) saving("Stata Plots\Figure10_C.gph", replace)

* Panel D - Hispanics
estimates clear

svy: mean borderwall if hispanic==1, over (year)
estimates store A
svy: mean borderwall if strongdem==1 & hispanic==1, over (year)
estimates store B
svy: mean borderwall if strongrep==1 & hispanic==1, over (year)
estimates store C

coefplot (A, pstyle(p1) color(gs0) label({bf:All}) recast(connected) ciopts(recast(rcap) color(gs0))) ///
(B, pstyle(p2) color(midblue) label({bf:Democrats}) recast(connected) ciopts(recast(rcap) color(midblue))) ///
(C, pstyle(p3) color(cranberry) label({bf:Republicans}) recast(connected) ciopts(recast(rcap) color(cranberry))) ///
, relocate(c.borderwall@2016.year=2016 c.borderwall@2017.year=2017 c.borderwall@2018.year=2018 c.borderwall@2019.year=2019 c.borderwall@2020.year=2020 c.borderwall@2021.year=2021) vertical coeflabels() xlabel(2016 "2016" 2017 "2017" 2018 "2018" 2019 "2019" 2020 "2020" 2021 "2021", labsize(large)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(large) angle(horizontal)) legend(size(large) rows(1) region(lcolor(black) fcolor(gs14)) position(12) bmargin(none)) nooffsets yline(0 .25 .50 .75 1, lcolor(gs14)) ytitle({bf:Opposition}, size(vlarge)) title({bf:  Hispanics}, size(8)) saving("Stata Plots\Figure10_D.gph", replace)

* Full Figure - Manually Extend Legend Along X-Axis for Black Panel
graph combine "Stata Plots\Figure10_A.gph" "Stata Plots\Figure10_B.gph" "Stata Plots\Figure10_C.gph" "Stata Plots\Figure10_D.gph", rows(2) altshrink


***** SUPPLEMENTARY MATERIAL 3 - PRRI BY DATE *****

svy: mean immigration_strength2, over (date)
svy: mean immigration_strength2 if strongdem==1, over (date)
svy: mean immigration_strength2 if strongrep==1, over (date)
svy: mean immigration_strength2 if white==1, over (date)
svy: mean immigration_strength2 if strongdem==1 & white==1, over (date)
svy: mean immigration_strength2 if strongrep==1 & white==1, over (date)
svy: mean immigration_strength2 if black==1, over (date)
svy: mean immigration_strength2 if hispanic==1, over (date)

svy: mean immigrant_kids, over (date)
svy: mean immigrant_kids if strongdem==1, over (date)
svy: mean immigrant_kids if strongrep==1, over (date)
svy: mean immigrant_kids if white==1, over (date)
svy: mean immigrant_kids if strongdem==1 & white==1, over (date)
svy: mean immigrant_kids if strongrep==1 & white==1, over (date)
svy: mean immigrant_kids if black==1, over (date)
svy: mean immigrant_kids if hispanic==1, over (date)

svy: mean borderwall, over (date)
svy: mean borderwall if strongdem==1, over (date)
svy: mean borderwall if strongrep==1, over (date)
svy: mean borderwall if white==1, over (date)
svy: mean borderwall if strongdem==1 & white==1, over (date)
svy: mean borderwall if strongrep==1 & white==1, over (date)
svy: mean borderwall if black==1, over (date)
svy: mean borderwall if hispanic==1, over (date)


